#include <iostream>
using namespace std;

struct Student
{
    int id;
    char name[20];
    int age;

    friend istream &operator>>(istream &in, Student &s)
    {
        in >> s.id >> s.name >> s.age;
        return in;
    }

    friend ostream &operator<<(ostream &out, Student &s)
    {
        out << s.id << " " << s.name << " " << s.age << endl;
        return out;
    }
};

int main()
{
    Student s1, s2;
    cin >> s1 >> s2;
    cout << s1 << s2 << endl;
    return 0;
}